<template>
  <div class="online">
    <div>
      <van-nav-bar
        title="Online Service"
        left-arrow
        @click-left="$router.back()"
      />
    </div>
    <div class="online-person">
      <img src="../../assets/imgs/onlineperson.png" alt="" srcset="" />
    </div>
    <div class="utils">
      <img :src="messages && messages[0].servers.customers.icon" alt="" srcset="" />
      <span>{{messages && messages[0].servers.customers.platform}}</span>
    </div>
    <h3>{{ messages && messages[0].servers.customers.contact }}</h3>
    <div class="btn">
      <a :href="messages && messages[0].servers.customers.url" target="_blank">Contact customer service</a>
      
      <div class="icon">7x24h</div>
    </div>
    <div class="bg">
      <img src="../../assets/imgs/onlinebg.png" alt="" srcset="" />
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      messages: null,
      tipsShow: false,
    };
  },
  mounted() {
    this.$store.dispatch("problemsrepy",{title: 'asdfasdf'}).then((res) => {
      console.log(res);
      this.messages = res;
    });
  },
  methods: {
    copy(e) {
      this.$toast("Copy succeeded");
    },
  },
};
</script>

<style lang="scss" scoped>
a{
  color: #fff;
}
.online {
  height: 100%;
  min-height: 100vh;
  background-color: #fff;
  .online-person {
    margin-top: 34px;
    text-align: center;
    img {
      width: 210px;
      height: 210px;
    }
  }
  .utils {
    display: flex;
    justify-content: center;
    align-items: center;
    img {
      width: 20px;
      height: 20px;
    }
    span {
      font-size: 17px;
      color: #3e3e3e;
      margin: 0 0 0 5px;
    }
  }
  h3 {
    padding: 10px 0;
    text-align: center;
    color: #3e3e3e;
    font-size: 20px;
    font-weight: bold;
  }
  .btn {
    position: relative;
    width: 270px;
    height: 50px;
    line-height: 50px;
    background: #4a67f5;
    margin: 30px auto;
    text-align: center;
    font-size: 20px;
    color: #fff;
    border-radius: 105px;
    .icon {
      position: absolute;
      top: -20px;
      right: -20px;
      width: 60px;
      height: 26px;
      line-height: 26px;
      background: #ff4f02;
      opacity: 1;
      border-radius: 13px 13px 13px 0px;
      font-size: 13px;
      font-weight: bold;
    }
  }
  .bg {
    position: absolute;
    width: 100%;
    left: 0;
    bottom: 0;
    img {
      height: 175px;
    }
  }
}
.dialog-notice {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  .notice {
    padding: 20px 0 0 0;
  }
  .notice-card {
    width: 300px;
    height: 204px;
    border-radius: 5px;
    background-color: #fff;
    background-size: 300px 204px;
    position: relative;
    text-align: center;
    background: url("../../assets/imgs/notice_market.png") no-repeat;
    background-size: contain;
    .card-icon {
      position: absolute;
      right: 10px;
      top: 10px;
    }
    h3 {
      font-size: 17px;
      padding: 30px 0 14px 0;
      color: #333;
    }
    p {
      padding: 0 40px;
      color: #666666;
    }
    .cancel {
      margin: 15px 10px 0 0;
      width: 75px;
      height: 40px;
      color: #4a67f5;
      background: #ffffff;
      border: 1px solid #4c6cf1;
    }
    .confirm {
      margin: 15px 0 0 0;
      width: 75px;
      height: 40px;
      background: #4a67f5;
      border-radius: 20px;
      border: none;
      color: #fff;
      box-shadow: 0px 2px 10px rgba(74, 103, 245, 0.4);
    }
    button {
      i {
        font-size: 13px;
      }
      margin: 30px 0 0 0;
      width: 150px;
      height: 40px;
      background: #4a67f5;
      border-radius: 20px;
      border: none;
      color: #fff;
      box-shadow: 0px 2px 10px rgba(74, 103, 245, 0.4);
    }
  }
}
</style>